#define _CRT_SECURE_NO_WARNINGS
#define FAC 1000
#define MAX 3000
#include<stdio.h>
int fac()
{
	int p[MAX] = { 0 };
	p[0] = 1;
	int cnt = 1;
	for (int mul = 2; mul <= FAC; ++mul)
	{
		int carry = 0;
		for (int i = 0; i < cnt; ++i)
		{
			int temp = (p[i] * mul) + carry;
			p[i] = temp % 10;
			carry = temp / 10;
		}
		while (carry > 0)
		{
			p[cnt] = carry % 10;
			carry /= 10;
			++cnt;
		}
	}
	
	for (int i = cnt - 1; i >= 0; --i)
	{
		printf("%d", p[i]);
	}
	return cnt;
}
int main()
{
	int size = fac();
	return 0;
}